# -*- coding: utf-8 -*-
# @Time : 2023/12/1 19:09
# @Author : 支晓光
# @Email : 1473858993@qq.com
# @File : capital.py
# @Project : YouGuuUII
from time import sleep

from appium.webdriver.common.appiumby import AppiumBy

from common.base_page import BasePage


class Capital(BasePage):
    # 搜索框
    et_stock_search = AppiumBy.ID,'com.jhss.youguu:id/et_stock_search'
    # 买入
    btn_buy = AppiumBy.ID,'com.jhss.youguu:id/btn_buy'
    # 断言信息
    et_stock_amount = AppiumBy.ID,'com.jhss.youguu:id/et_stock_amount'
    def not_capital(self):
        self.send_keys(self.et_stock_search,'腾讯')
        sleep(3)
        # 点击腾讯控股
        self.tap(398,281)
        sleep(1)
        # 刷新页面
        self.tap(309,75)
        self.click_ele(self.btn_buy)
        self.a = self.find_element(self.et_stock_amount).text